package com.team.auth.config.security;

import com.team.auth.config.security.enums.SsoStrategy;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

@Configuration
@ConfigurationProperties(prefix = "sso")
@Component
public class SsoProperites {
    private SsoStrategy ssoStrategy;
    private String userByUsernameUrl;
    private String allUserUrl;

    public String getCharacterEncoding() {
        return characterEncoding;
    }

    public void setCharacterEncoding(String characterEncoding) {
        this.characterEncoding = characterEncoding;
    }

    private String characterEncoding ="UTF-8";
    private int sessionTime = 1800000;

    public int getSessionTime() {
        return sessionTime;
    }

    public void setSessionTime(int sessionTime) {
        this.sessionTime = sessionTime;
    }

    public SsoStrategy getSsoStrategy() {
        return ssoStrategy;
    }

    public void setSsoStrategy(String ssoStrategy) {
        this.ssoStrategy = SsoStrategy.valueOf(ssoStrategy);
    }

    public String getUserByUsernameUrl() {
        return userByUsernameUrl;
    }

    public void setUserByUsernameUrl(String userByUsernameUrl) {
        this.userByUsernameUrl = userByUsernameUrl;
    }

    public String getAllUserUrl() {
        return allUserUrl;
    }

    public void setAllUserUrl(String allUserUrl) {
        this.allUserUrl = allUserUrl;
    }
}
